package user

import (
	"gorm.io/gorm"
	"xs.jsjb/internal/app/user/controller"
	"xs.jsjb/internal/app/user/entity"
	"xs.jsjb/internal/app/user/repository"
	"xs.jsjb/internal/app/user/service"
)

var (
	Entity = entity.User{}
)

func Build(db *gorm.DB) *controller.UserController {
	userRepo := repository.NewUserRepo(db)
	userService := service.NewUserService(userRepo)
	return controller.NewUserController(userService)
}
